package com.husong.util;

import java.util.HashMap;
import java.util.Map;


public class PointcutUtil {
	public static double base=50D;
	public static Map<String,Object> convertToPointcut(Long point){
		Map<String,Object> map=new HashMap<String,Object>();
		if(point<Math.pow(2, 0)*50){
			map.put("point1", Math.pow(2, 0)*50);
			map.put("point2", Math.pow(2, 1)*50);
			map.put("red1", "3元红包");
			map.put("red2", "5元红包");
			map.put("withdraw1", "提现费减少0.1%");
			map.put("withdraw2", "提现费减少0.2%");
			return map;
		}else if(point>=Math.pow(2, 0)*50&&point<Math.pow(2, 1)*50){
			map.put("point1", Math.pow(2, 1)*50);
			map.put("point2", Math.pow(2, 2)*50);
			map.put("red1", "5元红包");
			map.put("red2", "6元红包");
			map.put("withdraw1", "提现费减少0.2%");
			map.put("withdraw2", "提现费减少0.4%");
			return map;
		}else if(point>=Math.pow(2, 1)*50&&point<Math.pow(2, 2)*50){
			map.put("point1", Math.pow(2, 2)*50);
			map.put("point2", Math.pow(2, 3)*50);
			map.put("red1", "6元红包");
			map.put("red2", "8元红包");
			map.put("withdraw1", "提现费减少0.4%");
			map.put("withdraw2", "提现费减少0.8%");
			return map;
		}else if(point>=Math.pow(2, 2)*50&&point<Math.pow(2, 3)*50){
			map.put("point1", Math.pow(2, 3)*50);
			map.put("point2", Math.pow(2, 4)*50);
			map.put("red1", "8元红包");
			map.put("red2", "9元红包");
			map.put("withdraw1", "提现费减少0.8%");
			map.put("withdraw2", "提现费减少1.0%");
			return map;
		}else if(point>=Math.pow(2, 3)*50&&point<Math.pow(2, 4)*50){
			map.put("point1", Math.pow(2, 4)*50);
			map.put("point2", Math.pow(2, 5)*50);
			map.put("red1", "9元红包");
			map.put("red2", "10元红包");
			map.put("withdraw1", "提现费减少1.0%");
			map.put("withdraw2", "提现费减少1.1%");
			return map;
		}else if(point>=Math.pow(2, 4)*50&&point<Math.pow(2, 5)*50){
			map.put("point1", Math.pow(2, 5)*50);
			map.put("point2", Math.pow(2, 6)*50);
			map.put("red1", "10元红包");
			map.put("red2", "11元红包");
			map.put("withdraw1", "提现费减少1.1%");
			map.put("withdraw2", "提现费减少1.2%");
			return map;
		}else if(point>=Math.pow(2, 5)*50&&point<Math.pow(2, 6)*50){
			map.put("point1", Math.pow(2, 6)*50);
			map.put("point2", Math.pow(2, 7)*50);
			map.put("red1", "11元红包");
			map.put("red2", "12元红包");
			map.put("withdraw1", "提现费减少1.2%");
			map.put("withdraw2", "提现费减少1.3%");
			return map;
		}else if(point>=Math.pow(2, 6)*50&&point<Math.pow(2, 7)*50){
			map.put("point1", Math.pow(2, 7)*50);
			map.put("point2", Math.pow(2, 8)*50);
			map.put("red1", "12元红包");
			map.put("red2", "15元红包");
			map.put("withdraw1", "提现费减少1.3%");
			map.put("withdraw2", "提现费减少1.6%");
			return map;
		}else if(point>=Math.pow(2, 7)*50&&point<Math.pow(2, 8)*50){
			map.put("point1", Math.pow(2, 8)*50);
			map.put("point2", Math.pow(2, 9)*50);
			map.put("red1", "15元红包");
			map.put("red2", "20元红包");
			map.put("withdraw1", "提现费减少1.6%");
			map.put("withdraw2", "提现费减少1.8%");
			return map;
		}else if(point>=Math.pow(2, 8)*50&&point<Math.pow(2, 9)*50){
			map.put("point1", Math.pow(2, 9)*50);
			map.put("point2", Math.pow(2, 10)*50);
			map.put("red1", "20元红包");
			map.put("red2", "25元红包");
			map.put("withdraw1", "提现费减少1.8%");
			map.put("withdraw2", "提现费减少2.0%");
			return map;
		}else if(point>=Math.pow(2, 9)*50&&point<Math.pow(2, 10)*50){
			map.put("point1", Math.pow(2, 10)*50);
			map.put("point2", Math.pow(2, 11)*50);
			map.put("red1", "25元红包");
			map.put("red2", "50元红包");
			map.put("withdraw1", "提现费减少2.0%");
			map.put("withdraw2", "提现费减少2.5%");
			return map;
		}else if(point>=Math.pow(2, 10)*50&&point<Math.pow(2, 11)*50){
			map.put("point1", Math.pow(2, 11)*50);
			map.put("point2", Math.pow(2, 12)*50);
			map.put("red1", "50元红包");
			map.put("red2", "100元红包");
			map.put("withdraw1", "提现费减少2.5%");
			map.put("withdraw2", "提现费减少3.5%");
			return map;
		}else if(point>=Math.pow(2, 11)*50&&point<Math.pow(2, 12)*50){
			map.put("point1", Math.pow(2, 12)*50);
			map.put("point2", Math.pow(2, 13)*50);
			map.put("red1", "100元红包");
			map.put("red2", "500元红包");
			map.put("withdraw1", "提现费减少3.5%");
			map.put("withdraw2", "提现费减少4.5%");
			return map;
		}else if(point>=Math.pow(2, 12)*50&&point<Math.pow(2, 13)*50){
			map.put("point1", Math.pow(2, 13)*50);
			map.put("point2", Math.pow(2, 14)*50);
			map.put("red1", "500元红包");
			map.put("red2", "5000元红包");
			map.put("withdraw1", "提现费减少4.5%");
			map.put("withdraw2", "提现费减少5.0%");
			return map;
		}else if(point>=Math.pow(2, 13)*50&&point<Math.pow(2, 14)*50){
			map.put("point1", Math.pow(2, 14)*50);
			map.put("point2", "~");
			map.put("red1", "5000元红包");
			map.put("red2", "~");
			map.put("withdraw1", "提现费减少5.0%");
			map.put("withdraw2", "~");
			return map;
		}else{
			map.put("point1", "~");
			map.put("point2", "~");
			map.put("red1", "~");
			map.put("red2", "~");
			map.put("withdraw1", "~");
			map.put("withdraw2", "~");
			return map;
		}
	}
	
	public static void main(String[] args) {
		for(int i=0;i<16;i++){
			System.out.println(Math.pow(2, i)*50);
		}
	}
	
}
